package com.github.jspxnet.worktask.model.dto;

import com.github.jspxnet.sober.annotation.Column;
import com.github.jspxnet.utils.StringUtil;
import lombok.Data;
import java.io.Serializable;

@Data
public class WorkTaskDto implements Serializable {

    @Column(caption = "ID", notNull = true)
    private long id = 0;

    @Column(caption = "流程编号", length = 32, notNull = true)
    private String flowNo = StringUtil.empty;

    @Column(caption = "文档编号", length = 100, notNull = true)
    private String documentNo = StringUtil.empty;

    @Column(caption = "命名空间", length = 50, dataType = "isLengthBetween(1,50)")
    private String namespace = StringUtil.empty;

    @Column(caption = "节点ID", length = 32, notNull = true)
    private String nodeId = StringUtil.empty;

    //统一保存为json 格式
    @Column(caption = "变量表", length = 50000)
    private String valueMap = StringUtil.empty;

    //flowNo+documentNo+nodeId+userId+version+年月日 生成md5, 用这个id是为了确保迁移方便,查询也方便
    @Column(caption = "用户流程ID", length = 32, notNull = true)
    private String userFlowId = StringUtil.empty;

    @Column(caption = "用户id", length = 50)
    private String userId = StringUtil.empty;

    @Column(caption = "用户名", length = 50)
    private String userName = StringUtil.empty;

    //驳回重置的时候+1,放入历史
    @Column(caption = "文档编号", notNull = true)
    private int version = 0;

    @Column(caption = "完成状态", notNull = true)
    private int finished = 0;


}